<template>
  <div class="flex-c flex-align h-100">
    <el-button type="primary" @click="goRouter('/news')">go news</el-button>
    <el-button type="primary" @click="goRouter('/auth')">go user</el-button>
    <el-button type="primary" @click="getUserInfo()">get user info</el-button>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";
import userStore from "@/store/modules/user";
const useUserStore = userStore();
const router = useRouter();
const goRouter = (path: string): void => {
  router.push(path);
};
const getUserInfo = (): void => {
  let userInfo = useUserStore.getUserInfo;
  console.log(userInfo);
  let userToken = useUserStore.getUserToken;
  console.log(userToken);
};
</script>
